package StructuralPatterns.Decorator.StarBuck;

public class Decorator extends Drink {

  private Drink obj;

  public Decorator(Drink obj){
    this.obj = obj;
  }

  @Override
  public float cost() {
//    调料的价格 + 饮料的价格
    return super.getPrice() + obj.cost();
  }

  @Override
  public String getDes() {
    return super.getDes() + " " + super.getPrice() + " && " + obj.getDes();
  }
}
